# Contributor: Danct12 <danct12@disroot.org>
# Maintainer: Danct12 <danct12@disroot.org>
pkgname=glmark2
pkgver=2021.12
pkgrel=0
pkgdesc="OpenGL 2.0 and ES 2.0 benchmark"
url="https://github.com/glmark2/glmark2"
arch="all"
license="GPL-3.0-or-later"
subpackages="$pkgname-doc"
makedepends="python3 eudev-dev libjpeg-turbo-dev libpng-dev mesa-dev wayland-dev wayland-protocols"
source="$pkgname-$pkgver.tar.gz::https://github.com/glmark2/glmark2/archive/$pkgver.tar.gz"
options="!check" # no testsuite

prepare() {
	default_prepare
	python3 ./waf configure --prefix=/usr --with-flavors drm-gl,drm-glesv2,wayland-gl,wayland-glesv2,x11-gl,x11-glesv2
}

build() {
	python3 ./waf
}

package() {
	python3 ./waf install --destdir="$pkgdir"
}

sha512sums="
d1840e6213e27ead650987ff4945ef76276d900d2ff0c08e008e806b98b24d73d77c5fb248017590d9cc3c9293b2a5074d644f5e8473b8e655e0aedd55155eda  glmark2-2021.12.tar.gz
"
